package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.system.api.factory.RemoteViewFallbackFactory;
import com.ruoyi.system.api.interceptor.RemoteViewInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteViewService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteViewFallbackFactory.class,configuration= RemoteViewInterceptor.class)
public interface RemoteViewService {

    /**
     * 上传文件
     *
     * @return 结果
     */
    @GetMapping(value = "/file/view/{fileId}")
    void view(@PathVariable("fileId") String fileId,@RequestParam("name") String name);


}
